CC = gcc
INCLUDE = "D:/Program Files/PostgreSQL/9.5/include"
LIB = "D:/Program Files/PostgreSQL/9.5/lib"


all: pgsql.dll
	$(CC) -o bin/ex_02.exe ex_02.c  pgsql.dll   -I$(INCLUDE) -L$(LIB) -lpq -std=c99


pgsql.dll: pgsql.h pgsql.c
	$(CC) pgsql.c -shared -o pgsql.dll -I$(INCLUDE) -L$(LIB) -lpq -std=c99


clean:
	rm -rf pgsql.dll
	rm -rf bin/ex_02.exe
